{{/*
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at http://mozilla.org/MPL/2.0/.

Copyright (c) 2021-present Kaleidos Ventures SL
*/}}

{{ define "main" }}
  <section class="section-sm">
    <div class="container">
      <div class="row justify-content-center">
        <div class="col-10 featured-post">
          <article class="card featured-post">
            <div class="row no-gutters align-items-center">
              <div class="col-md-5">
                {{ if .Params.Image }}
                <img src="{{ .Params.Image | absURL }}" class="card-img" alt="{{ .Title | markdownify }}">
                {{ end }}
              </div>
              <div class="col-md-6 offset-md-1">
                <div class="card-body">
                  <h1 class="card-title-sans">{{ .Title | markdownify }}</h1>
                  <p class="card-text-second">{{.Summary}}...</p>
                </div>
              </div>
            </div>
          </article>
        </div>
      </div>
    </div>
    <div class="container">
      <div class="accordions-container" id="accordion">
        {{ range sort (where .Site.RegularPages "Type" "faq") ".Params.order" }}
          <div id="{{.Params.Slug}}" class="card accordion">
            <div class="card-header pointer" id="heading-{{.Params.slug}}">
              <h5 data-toggle="collapse" data-target="#collapse-{{.Params.slug}}" aria-expanded="true" aria-controls="collapse-{{.Params.slug}}">
                {{.Title}}
              </h5>
            </div>

            <div id="collapse-{{.Params.slug}}" class="collapse" aria-labelledby="heading-{{.Params.slug}}" data-parent="#accordion">
              <div class="card-body">
                {{.Content}}
              </div>
            </div>
          </div>
        {{ end }}
      </div>
    </div>
  </section>
{{ end }}
